import { createRouter, createWebHashHistory } from "vue-router"; // 修改这里
import page from "./page";

const router = createRouter({
  history: createWebHashHistory(), // 修改这里，去掉BASE_URL参数
  routes: [
    {
      path: "/login",
      name: "login",
      component: () => import("../views/login/login.vue"),
    },
    {
      path: "/register",
      name: "register",
      component: () => import("../views/login/register.vue"),
    },
    {
      path: "/",
      redirect: "/storeMessage",
      component: () => import("@/layout/index.vue"),
      children: [...page],
    },
  ],
});

export default router;
